#include "osTest.h"
#include "los_task.h"
#include "los_debug.h"
#include <stdlib.h>

#ifndef __ANSWER4_DEMO_H__
#define __ANSWER4_DEMO_H__

#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */


VOID Answer4_Demo(UINT32 argc,CHAR**argv);
#define MY_TASK_PRIORITY 25
#define O_RDWR 0X2
#define O_CREAT 0x40
#define SEM_COUNT 1
#define QUEUE_SHORT_BUFFER_LENGTH 15

UINT32 g_AnswerTaskID01;
UINT32 g_AnswerTaskID02;
UINT32 g_AnswerTaskID03;
UINT32 g_AnswerTaskID04;
UINT32 g_AnswerTaskID05;
UINT32 g_AnswerTaskID06;
UINT32 g_AnswerTaskID07;
UINT32 g_AnswerTaskID08;
UINT32 g_AnswerTaskID09;
char g_syncMode;
char g_saveMode;
UINT32 g_AnswerMutex;
UINT32 g_AnswerMutexForHyperMode;
UINT16 g_AnswerSem;
UINT16 g_AnswerSemForHyperMode;
int g_fd;
EVENT_CB_S g_AnswerEvent;
EVENT_CB_S g_AnswerEventForHyperMode;
UINT32 g_AnswerQueue;
UINT32 g_AnswerQueueForHyperMode;
int digit;
int fileNum;
int fileNumTemp;
int cnt;
int digitTemp1;
int digitTemp2;
int digitTemp3;
int digitTemp4;
int digitTemp5;
int digitTemp;


char sendBuffer1[QUEUE_SHORT_BUFFER_LENGTH] = "Task1 ready";
char sendBuffer2[QUEUE_SHORT_BUFFER_LENGTH] = "Task2 ready";
char sendBuffer3[QUEUE_SHORT_BUFFER_LENGTH] = "Task3 ready";
char sendBufferForHyperMode[QUEUE_SHORT_BUFFER_LENGTH] = "Task4 ready";
char recvBuffer[QUEUE_SHORT_BUFFER_LENGTH] = "";
char recvBufferForHyperMode[QUEUE_SHORT_BUFFER_LENGTH] = "";
char fileName1[20] = "/ram/pi000.txt";
char fileName2[20] = "/ram/pi000.txt";
char fileName3[20] = "/ram/pi000.txt";
char fileName4[20] = "/ram/pi000.txt";
char fileName5[20] = "/ram/pi000.txt";

static VOID Task01();
static VOID Task02();
static VOID Task03();
static VOID Task04();
static VOID HyperTask01();
static VOID HyperTask02();
static VOID HyperTask03();
static VOID HyperTask04();
static VOID HyperTask05();
static UINT32 Create_Task01();
static UINT32 Create_Task02();
static UINT32 Create_Task03();
static UINT32 Create_Task04();
static UINT32 Create_HyperTask01();
static UINT32 Create_HyperTask02();
static UINT32 Create_HyperTask03();
static UINT32 Create_HyperTask04();
static UINT32 Create_HyperTask05();
static VOID caculatePi(int num1,int num2,char *buf);


#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cplusplus */
#endif /* __cplusplus */

#endif /*__TASK_DEMO_H__*/